<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/head.jspf"%>  

<head>
<title>东方易云后台管理系统</title>

<script language="javascript">
function goPage(pageNo) {
	document.goPageForm.pageNo.value = pageNo;
	document.goPageForm.submit();
}

function operation(userId, opt, status){
	$("#userIdH").val(userId);
	if(opt == 'view'){
		$('#changeUserForm').attr("action","/user/${type}/view");
	}else if(opt == 'edit'){
		$('#changeUserForm').attr("action","/user/${type}/edit");
	}else if(opt == 'control'){
		$("#statusH").val(status);
		$('#changeUserForm').attr("action","/user/${type}/control");
	}else if(opt == 'resetPassword'){
		if(!sl_confirm("重置密码", null)){
			return ;
		}
		$('#changeUserForm').attr("action","/user/${type}/reset");
	}
	
	$('#changeUserForm').submit();
}
</script>

</head>
<body>
		<form name="changeUserForm" id="changeUserForm" action="/user/system/list"  method="post">
			<input type="hidden" name="userIdH" id="userIdH" />
			<input type="hidden" name="statusH" id="statusH" />
			用户名称：<input  id ="userIdSearch" name="userIdSearch"  value="<c:out value='${userIdSearch}'/>" />
			真实名称：<input  id ="userNameSearch" name="userNameSearch"  value="<c:out value='${userNameSearch}'/>"/>
			手机号码：<input  id ="mobilePhoneSearch" name="mobilePhoneSearch"  value="<c:out value='${mobilePhoneSearch}'/>"/>
			账号状态：启用：<input name="statusSearch" type="radio" value="1" <c:if test="${statusSearch eq statusOne}">checked</c:if> /> 停用：<input name="statusSearch" type="radio"  value="0" <c:if test="${statusSearch eq statusZero}">checked</c:if>/>
			<input value="查&nbsp;&nbsp;询" type="submit"/>
			
<br/>
<br/>
<a href="/user/system/add">增加</a>
<table border="1">
	<tr>
	<td>序号</td>
	<td> 用户名</td>
	<td> 真实姓名 </td>
	<td>手机号码 </td>
	<td>办公电话</td>
	<td>电子邮箱</td>
	<td>账号状态 </td>
	<td>操作</td>
	</tr>
	<c:forEach var="userInfo" items="${UserInfoVoList}" varStatus="vStatus">
		<tr>
		<td>${vStatus.count+(pageNo-1)*recordCountInOnePage}</td>
		<td><c:out value="${userInfo.userId}"/></td>
		<td><c:out value="${userInfo.username}"/></td>
		<td><c:out value="${userInfo.mobilePhone}"/></td>
		<td><c:out value="${userInfo.officePhone}"/></td>
		<td><c:out value="${userInfo.emailAddress}"/></td>
		<td><c:out value="${statusMap[userInfo.status]}"/></td>
		
		<td>
		<a href="javascript:void(0)" onclick="operation('<c:out value="${userInfo.userId}" />', 'view');"  title="view" >查看</a>
		<a href="javascript:void(0)" onclick="operation('<c:out value="${userInfo.userId}" />', 'edit');"  title="Edit" >修改</a>
		<a href="javascript:void(0)" onclick="operation('<c:out value="${userInfo.userId}" />', 'control', '<c:out value="${userInfo.status == statusOne ? statusZero:statusOne}"/>');"  title="control" >
		<c:out value="${statusMap[userInfo.status == statusOne ? statusZero:statusOne]}"/>
		</a>
		<a href="javascript:void(0)" onclick="operation('<c:out value="${userInfo.userId}" />', 'resetPassword');"  title="ResetPassword" >密码重置</a>
		</td>
		</tr>
	</c:forEach>


</table>


</form>

	
	<c:out value="${pageInfo}" escapeXml="false"></c:out>

<form method="post" action="/user/system/list" id="goPageForm" name="goPageForm">
      <input type="hidden" name="pageNo" value="<c:out value='${pageNo}'/>" />
      <input type="hidden" id="userIdSearch" name="userIdSearch" value="<c:out value='${userIdSearch }' />">
      <input type="hidden" id="userNameSearch" name="userNameSearch" value="<c:out value='${userNameSearch }' />">
      <input type="hidden" id="mobilePhoneSearch" name="mobilePhoneSearch" value="<c:out value='${mobilePhoneSearch }' />">
      <input type="hidden" id="statusSearch" name="statusSearch" value="<c:out value='${statusSearch }' />">
</form>
</body>

</html>
